<nav class="navbar navbar-inverse" role="navigation" style="border-radius: 0">
    <div class="navbar-header">
        <a class="navbar-brand" href="#">个人资料</a>
    </div>
    <div class="collapse navbar-collapse navbar-ex1-collapse">
        <ul class="nav navbar-nav navbar-right">
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">{username} <b class="caret"></b></a>
                <ul class="dropdown-menu">
                    <?=$group == 1 ? '<li><a href="index.php?c=admin/index">后台</a></li>':''?>
                    <li><a href="#" onclick="out()">注销</a></li>
                </ul>
            </li>
        </ul>
    </div>
</nav>

<div class="container" style="border: 5px dashed #ddd;padding: 20px;">
    <div style="position: absolute">
        <div onclick="$('#update').removeClass('sr-only')">
            <img width="100%" height="100%" style="border: 5px dashed #ddd;width: 150px;height: 150px;border-radius: 75px" src="public/img/portrait/{imgurl}"/>
        </div>
        <div style="border-bottom: 5px dashed #ddd;margin-top: 10px;padding: 5px;text-align: center">{name}</div>
    </div>

    <div style="float: right;width: 60%;">
        <div style="border: 5px dashed #ddd;width: 100%;height: 500px;padding: 20px;">
            {remarks}
        </div>
    </div>
</div>
<div id="update" class="container col-lg-4 sr-only" style="background-color: #fff;position: absolute;top: 20%;left:35%;border: 5px dashed #ddd;padding: 20px;">
    <form id="form" action="index.php?c=user/userdo" enctype="multipart/form-data" method="post" role="form">
        <legend>修改个人资料</legend>
        <input type="hidden" name="type" value="update"/>
        <input type="hidden" name="id" id="id" value="{id}"/>
        <div class="form-group">
            <label for="name">呢称</label>
            <input type="text" class="form-control" name="name" id="name">
        </div>
        <div class="form-group">
            <label for="img">头像</label>
            <input type="file" name="img" id="img" accept="image/png,image/jpeg"/>
        </div>
        <div class="form-group">
            <label for="remarks">个人简介</label>
            <textarea name="remarks" id="remarks" class="form-control" style="height: 100px;"></textarea>
        </div>
        <button type="button" class="btn btn-primary" onclick="update()">修改</button>
        <button type="button" class="btn btn-primary" style="float: right" onclick="$('#update').addClass('sr-only')">关闭</button>
    </form>
</div>